//package com.liuyu.consumer.config;
//
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.Binding;
//import org.springframework.amqp.core.BindingBuilder;
//import org.springframework.amqp.core.DirectExchange;
//import org.springframework.amqp.core.Queue;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//@Slf4j
//public class DirectConfig {
//
//    @Bean
//    public DirectExchange directExchange() {
//        return new DirectExchange("direct.exchange");
//    }
//
//    @Bean
//    public Queue directQueue1() {
//        return new Queue("direct.queue1");
//    }
//
//    @Bean
//    public Queue directQueue2() {
//        return new Queue("direct.queue2");
//    }
//
//    @Bean
//    public Binding bindingBinding1(Queue directQueue1, DirectExchange directExchange) {
//        return BindingBuilder.bind(directQueue1).to(directExchange).with("red");
//    }
//
//    @Bean
//    public Binding bindingBinding2(Queue directQueue2, DirectExchange directExchange) {
//        return BindingBuilder.bind(directQueue2).to(directExchange).with("yellow");
//    }
//
//}
